function plotspread( a, b, HP, X, Y )

close all;

v = squeeze(HP(a,b,1:61));
lamda = sqrt(v'*v);
v = v / sqrt(v'*v);

w = randn(61,1);
w = w - w'*v*v;
w = w / sqrt(w'*w);

pa_x = X(Y==a,:)*v + HP(a,b,62)/lamda;
pa_y = X(Y==a,:)*w;
pb_x = X(Y==b,:)*v + HP(a,b,62)/lamda;
pb_y = X(Y==b,:)*w;


scatter( pa_x, pa_y ,'x','r');
hold on;
scatter( pb_x, pb_y,'+','b');

ylim = get(gca, 'YLim');
plot([0, 0],[ylim(1) ylim(2)], 'k', 'LineWidth', 2)

end

